.class Lcom/xingbook/ting/fragment/o;
.super Landroid/os/Handler;


# instance fields
.field a:Ljava/lang/ref/WeakReference;


# direct methods
.method constructor <init>(Lcom/xingbook/ting/fragment/TingPlayContentFragment;)V
    .locals 1

    invoke-direct {p0}, Landroid/os/Handler;-><init>()V

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/xingbook/ting/fragment/o;->a:Ljava/lang/ref/WeakReference;

    new-instance v0, Ljava/lang/ref/WeakReference;

    invoke-direct {v0, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V

    iput-object v0, p0, Lcom/xingbook/ting/fragment/o;->a:Ljava/lang/ref/WeakReference;

    return-void
.end method


# virtual methods
.method public handleMessage(Landroid/os/Message;)V
    .locals 8
    .annotation build Landroid/annotation/SuppressLint;
        value = {
            "ShowToast"
        }
    .end annotation

    const/4 v3, 0x1

    invoke-super {p0, p1}, Landroid/os/Handler;->handleMessage(Landroid/os/Message;)V

    iget-object v0, p0, Lcom/xingbook/ting/fragment/o;->a:Ljava/lang/ref/WeakReference;

    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/xingbook/ting/fragment/TingPlayContentFragment;

    if-nez v0, :cond_1

    :cond_0
    :goto_0
    return-void

    :cond_1
    invoke-virtual {v0}, Lcom/xingbook/ting/fragment/TingPlayContentFragment;->getActivity()Landroid/support/v4/app/FragmentActivity;

    move-result-object v2

    if-eqz v2, :cond_0

    iget v1, p1, Landroid/os/Message;->what:I

    packed-switch v1, :pswitch_data_0

    :pswitch_0
    goto :goto_0

    :pswitch_1
    iget-object v1, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    if-nez v1, :cond_2

    invoke-virtual {v0}, Lcom/xingbook/ting/fragment/TingPlayContentFragment;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    iget v1, p1, Landroid/os/Message;->arg2:I

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v0

    :goto_1
    iget v1, p1, Landroid/os/Message;->arg1:I

    invoke-static {v2, v0, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    goto :goto_0

    :cond_2
    iget-object v0, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v0, Ljava/lang/String;

    goto :goto_1

    :pswitch_2
    invoke-static {v2}, Lcom/xingbook/ting/play/j;->a(Landroid/content/Context;)Lcom/xingbook/ting/play/j;

    move-result-object v1

    invoke-virtual {v1}, Lcom/xingbook/ting/play/j;->g()Lcom/xingbook/audio/b/b;

    move-result-object v4

    if-eqz v4, :cond_0

    move-object v1, v2

    check-cast v1, Lcom/xingbook/ting/activity/TingPlayAct;

    invoke-virtual {v4}, Lcom/xingbook/audio/b/b;->u()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v1, v5, v3, v3}, Lcom/xingbook/ting/activity/TingPlayAct;->a(Ljava/lang/String;ZZ)V

    invoke-virtual {v4}, Lcom/xingbook/audio/b/b;->b()Ljava/lang/String;

    move-result-object v1

    if-eqz v1, :cond_3

    const-string v5, ""

    invoke-virtual {v5, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_4

    :cond_3
    invoke-static {v2}, Lcom/xingbook/ting/play/j;->a(Landroid/content/Context;)Lcom/xingbook/ting/play/j;

    move-result-object v1

    invoke-virtual {v1}, Lcom/xingbook/ting/play/j;->c()Lcom/xingbook/audio/b/a;

    move-result-object v1

    invoke-virtual {v1}, Lcom/xingbook/audio/b/a;->u()Ljava/lang/String;

    move-result-object v1

    :cond_4
    invoke-static {v0}, Lcom/xingbook/ting/fragment/TingPlayContentFragment;->b(Lcom/xingbook/ting/fragment/TingPlayContentFragment;)Landroid/widget/TextView;

    move-result-object v5

    new-instance v6, Ljava/lang/StringBuilder;

    const-string v7, "\u4e13\u8f91\uff1a"

    invoke-direct {v6, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v6, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v5, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    invoke-static {v0}, Lcom/xingbook/ting/fragment/TingPlayContentFragment;->a(Lcom/xingbook/ting/fragment/TingPlayContentFragment;)Landroid/widget/ImageView;

    move-result-object v1

    invoke-virtual {v4}, Lcom/xingbook/audio/b/b;->t()Ljava/lang/String;

    move-result-object v5

    invoke-static {v5}, Lcom/xingbook/park/d/a;->a(Ljava/lang/String;)Z

    move-result v5

    invoke-virtual {v1, v5}, Landroid/widget/ImageView;->setSelected(Z)V

    invoke-static {v0}, Lcom/xingbook/ting/fragment/TingPlayContentFragment;->c(Lcom/xingbook/ting/fragment/TingPlayContentFragment;)Landroid/widget/ImageView;

    move-result-object v5

    invoke-static {v2}, Lcom/xingbook/c/n;->a(Landroid/content/Context;)Lcom/xingbook/c/n;

    move-result-object v1

    invoke-virtual {v1}, Lcom/xingbook/c/n;->g()Lcom/xingbook/park/d/e;

    move-result-object v1

    invoke-virtual {v4}, Lcom/xingbook/audio/b/b;->t()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v4}, Lcom/xingbook/audio/b/b;->s()I

    move-result v6

    invoke-virtual {v1, v2, v6}, Lcom/xingbook/park/d/e;->c(Ljava/lang/String;I)Z

    move-result v1

    if-eqz v1, :cond_5

    const/4 v1, 0x0

    :goto_2
    invoke-virtual {v5, v1}, Landroid/widget/ImageView;->setEnabled(Z)V

    invoke-static {v0}, Lcom/xingbook/ting/fragment/TingPlayContentFragment;->d(Lcom/xingbook/ting/fragment/TingPlayContentFragment;)Landroid/widget/ImageView;

    move-result-object v1

    invoke-virtual {v4}, Lcom/xingbook/audio/b/b;->t()Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Lcom/xingbook/park/d/n;->a(Ljava/lang/String;)Z

    move-result v2

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setSelected(Z)V

    invoke-static {v0, v4}, Lcom/xingbook/ting/fragment/TingPlayContentFragment;->a(Lcom/xingbook/ting/fragment/TingPlayContentFragment;Lcom/xingbook/audio/b/b;)V

    goto/16 :goto_0

    :cond_5
    move v1, v3

    goto :goto_2

    :pswitch_3
    invoke-static {v0}, Lcom/xingbook/ting/fragment/TingPlayContentFragment;->a(Lcom/xingbook/ting/fragment/TingPlayContentFragment;)Landroid/widget/ImageView;

    move-result-object v0

    invoke-static {v2}, Lcom/xingbook/ting/play/j;->a(Landroid/content/Context;)Lcom/xingbook/ting/play/j;

    move-result-object v1

    invoke-virtual {v1}, Lcom/xingbook/ting/play/j;->g()Lcom/xingbook/audio/b/b;

    move-result-object v1

    invoke-virtual {v1}, Lcom/xingbook/audio/b/b;->t()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Lcom/xingbook/park/d/a;->a(Ljava/lang/String;)Z

    move-result v1

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setSelected(Z)V

    goto/16 :goto_0

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_1
        :pswitch_2
        :pswitch_0
        :pswitch_0
        :pswitch_3
    .end packed-switch
.end method
